package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestTask;
import com.estar.assistsurvy.entity.ResponseOrder;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class TaskSupervisionThread extends BaseThread {

	private RequestTask requestTask;

	public TaskSupervisionThread(Context context, Handler handler, RequestTask requestTask) {
		super(context, handler);
		this.requestTask = requestTask;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.TASK_SUPERVISE;
		json=gson.toJson(requestTask);
		postRequest(url_str, json);
		if(result!=null){
			Log.i("wl", "任务监管列表返回值"+result);
			ResponseOrder task=new ResponseOrder();
			task=gson.fromJson(result, ResponseOrder.class);
			msg.what=0;
			msg.obj=task;
			msg.sendToTarget();
		}
	}
}
